package com.dyna.launch.props;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhoucaiwng
 * 自定义公共配置信息
 */
@Getter
@AllArgsConstructor
public enum DefineProperties {

    /**
     * 公共配置
     */
/*    CIRCULAR_REFERENCES("spring.main.allow-circular-references","true"),
    SENTINEL_DASHBOARD("spring.cloud.sentinel.transport.dashboard","192.168.220.121:8792"),*/

    /** mybatis_plus 公共配置 */
    MYBATIS_PLUS_MAPPING("mybatis-plus.configuration.map-underscore-to-camel-case","true"),
    MYBATIS_PLUS_LOCATIONS("mybatis-plus.mapper-locations","classpath:mapper/*.xml"),
    MYBATIS_PLUS_LOGIC_DELETE_FIELD("mybatis-plus.global-config.db-config.logic-delete-field","delFlag"),
    MYBATIS_PLUS_LOGIC_DELETE("mybatis-plus.global-config.db-config.logic-delete-value","2"),
    MYBATIS_PLUS_LOGIC_NOT_DELETE("mybatis-plus.global-config.db-config.logic-not-delete-value","0"),

    /** 日志 */
    LOGGER_LEVEL("logging.level.com.dyna","debug");

    private String key;

    private String value;

    public static void defineProps(java.util.Properties props) {
        DefineProperties[] values = DefineProperties.values();
        for (DefineProperties value : values) {
            props.setProperty(value.getKey(),value.getValue());
        }
    }

}
